<%@ page import="com.casework.auth.AuthUser" %>



<div class="fieldcontain ${hasErrors(bean: authUserInstance, field: 'username', 'error')} required">
    <label for="username">
        <g:message code="authUser.username.label" default="Username" />
        <span class="required-indicator">*</span>
    </label>
    <g:textField name="username" required="" value="${authUserInstance?.username}"/>
</div>


<g:if test="${!authUserInstance.id}">
    <div class="fieldcontain ${hasErrors(bean: authUserInstance, field: 'password', 'error')} required">
        <label for="password">
            <g:message code="authUser.password.label" default="Password" />
            <span class="required-indicator">*</span>
        </label>
        <g:textField name="password" required="" value="${authUserInstance?.password}"/>
    </div>
</g:if>

<div class="fieldcontain ${hasErrors(bean: authUserInstance, field: 'email', 'error')} ">
    <label for="email">
        <g:message code="authUser.email.label" default="Email" />
        
    </label>
    <g:textField name="email" value="${authUserInstance?.email}"/>
</div>

<div class="fieldcontain ">
    <label for="roleAdmin">
        <g:message code="authUser.roleAdmin.label" default="Admin Role" />

    </label>
    <g:checkBox name="roleAdmin" value="${authUserInstance.id ?authUserInstance.admin : false}"/>
</div>

<div class="fieldcontain ">
    <label for="roleEditor">
        <g:message code="authUser.roleEditor.label" default="User Role" />

    </label>
    <g:checkBox name="roleEditor" value="${authUserInstance.id ? authUserInstance.user : true}"/>
</div>
